#ifndef _RANDOM_H
#define _RANDOM_H

#include "MersenneTwister.h"

#ifdef GALLIUMENGINE_DLL 
#define GALLIUMENGINE_API __declspec( dllexport )
#else
#define GALLIUMENGINE_API __declspec( dllimport )
#endif

namespace GalliumEngine
{

	

	class GALLIUMENGINE_API RandomUtils
	{
		 static unsigned long initialize[4];// = {0x123, 0x234, 0x345, 0x456};
		 static unsigned long length ;//= 4;
	     static Random32 random;	
	public:
		static inline unsigned long Random()
		{
			return random();
		}
	
		static inline int randomi(int min, int max)
		{
			return Random() % (max-min)+min;
		}

		static inline unsigned long randomi(int max)
		{
			return Random() % max;
		}

		static inline float randomf(float min, float max)
		{
			return (Random() / (float)ULONG_MAX) * (max-min)+min;
		}

		static inline float randomf(float max)
		{
			return (Random() / (float)ULONG_MAX) * max;
		}
	};
}



#endif